//
//  WUHeadCollectionCell.m
//  Home
//
//  Created by 吴军虎吴军虎 on 16/5/6.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "WUHeadCollectionCell.h"

@interface WUHeadCollectionCell()

@property (nonatomic,retain)UILabel *xinLabel;
@property (nonatomic,retain)UILabel *yanjiangL;
@property (nonatomic,retain)UILabel *fenxiangL;

@end

@implementation WUHeadCollectionCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
        self.backgroundColor = LV;
    }
    return self;
}
- (void)creatView{
    
    
    self.contentView.backgroundColor = [UIColor whiteColor];
    
    UIImageView *xinImageView = [UIImageView new];
    xinImageView.image = [UIImage imageNamed:@"ge"];
    [self.contentView addSubview:xinImageView];
    [xinImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(14 * AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(20 * AUTO_WIDTH , 20 *AUTO_WIDTH));
        make.left.mas_equalTo(50/2* AUTO_WIDTH);
        
        
    }];
    
    
    
    
    self.xinLabel = [UILabel new];
    [self.contentView addSubview:self.xinLabel];
    [self.xinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(xinImageView);
        make.left.mas_equalTo(xinImageView.mas_right).offset(6* AUTO_WIDTH);
        make.height.mas_equalTo(25* AUTO_WIDTH);
        make.width.mas_equalTo(68 * AUTO_WIDTH);////
        
    }];
    self.xinLabel.alpha = 0.6;
    self.xinLabel.font=[UIFont fontWithName:TFont size:TEXTFONT *AUTO_WIDTH];
    self.xinLabel.text = @"800";
    
    
    
    
    UILabel *jianliLabel = [UILabel new];
    [self.contentView addSubview:jianliLabel];
    [jianliLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(xinImageView.mas_bottom).offset(-1* AUTO_WIDTH);
        make.left.mas_equalTo(xinImageView.mas_left).offset(- 4* AUTO_WIDTH);
        make.height.mas_equalTo(38* AUTO_WIDTH);
        
    }];
    
    jianliLabel.text = @"人查看了简历";
    jianliLabel.font=[UIFont fontWithName:TFont size:TEXTCONTENTFONT2 * AUTO_WIDTH];
    jianliLabel.alpha = 0.6;
    
    
    
    
    
    //1竖线
    UIImageView *imageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(0* AUTO_WIDTH , 0 * AUTO_WIDTH , 500*AUTO_WIDTH , 70 * AUTO_WIDTH)];
    [self.contentView addSubview:imageView2];
    imageView2.alpha = 0.2;
    UIGraphicsBeginImageContext(imageView2.frame.size);   //开始画线
    [imageView2.image drawInRect:CGRectMake(0, 0, imageView2.frame.size.width, imageView2.frame.size.height)];
    CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);  //设置线条终点形状
    
    
    CGFloat leng2[] = {3,1};
    CGContextRef lin2 = UIGraphicsGetCurrentContext();
    CGContextSetStrokeColorWithColor(lin2, [UIColor blackColor].CGColor);
    
    CGContextSetLineDash(lin2, 0, leng2, 2);  //画虚线
    CGContextMoveToPoint(lin2, self.contentView.frame.size.width/3, 20.0);    //开始画线//10 x
    CGContextAddLineToPoint(lin2, self.contentView.frame.size.width/3 , 70.0 * AUTO_WIDTH);
    CGContextStrokePath(lin2);
    
    imageView2.image = UIGraphicsGetImageFromCurrentImageContext();
    
    
    
    
    
    
    UIImageView *yanjiangImageV = [UIImageView new];
    [self.contentView addSubview:yanjiangImageV];
    yanjiangImageV.image = [UIImage imageNamed:@"like"];
    [yanjiangImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(14* AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(20 * AUTO_WIDTH, 20* AUTO_WIDTH));
        make.left.mas_equalTo(xinImageView.mas_right).offset(92 * AUTO_WIDTH);
        
    }];
    

    self.yanjiangL = [UILabel new];
    [self.contentView addSubview:self.yanjiangL];
    [self.yanjiangL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.xinLabel);
        make.height.mas_equalTo(self.xinLabel);
        make.left.mas_equalTo(yanjiangImageV.mas_right).offset(8* AUTO_WIDTH);
        make.width.mas_equalTo(68 * AUTO_WIDTH);////
        
        
    }];
    self.yanjiangL.alpha = 0.6;
    self.yanjiangL.font=[UIFont fontWithName:TFont size:TEXTFONT * AUTO_WIDTH];
    self.yanjiangL.text = @"1100";
    
    
    
    UILabel *yanjiangL = [UILabel new];
    [self.contentView addSubview:yanjiangL];
    [yanjiangL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(yanjiangImageV.mas_bottom).offset(0 * AUTO_WIDTH);
        make.left.mas_equalTo(jianliLabel.mas_right).offset(29 * AUTO_WIDTH);
        make.height.mas_equalTo(38* AUTO_WIDTH);
        
    }];
    
    yanjiangL.text = @"人对简历感兴趣";
    yanjiangL.font =[UIFont fontWithName:TFont size:TEXTCONTENTFONT2 * AUTO_WIDTH];
    yanjiangL.alpha = 0.6;
    

    
    //2竖线
    UIImageView *imageView3 = [[UIImageView alloc]initWithFrame:CGRectMake(0 , 0 , 500   * AUTO_WIDTH, 70 * AUTO_WIDTH)];
    [self.contentView addSubview:imageView3];
    imageView3.alpha = 0.2;
    UIGraphicsBeginImageContext(imageView3.frame.size);   //开始画线
    [imageView3.image drawInRect:CGRectMake(0, 0, imageView3.frame.size.width, imageView3.frame.size.height)];
    CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);  //设置线条终点形状
    
    
    CGFloat leng3[] = {3,1};
    CGContextRef lin3 = UIGraphicsGetCurrentContext();
    CGContextSetStrokeColorWithColor(lin3, [UIColor blackColor].CGColor);
    
    CGContextSetLineDash(lin3, 0, leng3, 2);  //画虚线
    CGContextMoveToPoint(lin3, 2 *self.contentView.frame.size.width/3, 20.0);    //开始画线//10 x
    CGContextAddLineToPoint(lin3, 2 * self.contentView.frame.size.width/3 , 70.0);
    CGContextStrokePath(lin3);
    
    imageView3.image = UIGraphicsGetImageFromCurrentImageContext();
    
    
    
    UIImageView *fenxiangImageView = [UIImageView new];
    fenxiangImageView.image  = [UIImage imageNamed:@"display"];
    [self.contentView addSubview:fenxiangImageView];
    [fenxiangImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(xinImageView);
        make.size.mas_equalTo(xinImageView);
        make.left.mas_equalTo(265* AUTO_WIDTH);
        
        
    }];
    
    self.fenxiangL = [UILabel new];
    [self.contentView addSubview:self.fenxiangL];
    [self.fenxiangL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.yanjiangL);
        make.height.mas_equalTo(self.yanjiangL);
        make.left.mas_equalTo(fenxiangImageView.mas_right).offset(5* AUTO_WIDTH);
        make.width.mas_equalTo(68 * AUTO_WIDTH);////
        
    }];
    
    self.fenxiangL.text = @"1200";
    self.fenxiangL.alpha = 0.6;
    self.fenxiangL.font=[UIFont fontWithName:TFont size:TEXTFONT * AUTO_WIDTH];
    UILabel *fenxiangL = [UILabel new];
    [self.contentView addSubview:fenxiangL];
    [fenxiangL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(fenxiangImageView.mas_bottom).offset(- 1* AUTO_WIDTH);
        make.left.mas_equalTo(fenxiangImageView.mas_left).offset(-3* AUTO_WIDTH);
        make.height.mas_equalTo(38* AUTO_WIDTH);
        
        
        
    }];
    fenxiangL.text = @"分享带来的展示";
    fenxiangL.font=[UIFont fontWithName:TFont size:TEXTCONTENTFONT2 * AUTO_WIDTH];
    fenxiangL.alpha = 0.6;
    
    
    
}



@end
